<template>
	<div>
		<van-tabbar v-model="selectedTab" fixed route>
			<van-tabbar-item v-for="(item,i) in tabbarItems" :key="i" :icon="item.icon" :to="{name:item.routeName}">
				{{item.title}}
			</van-tabbar-item>
		</van-tabbar>
	</div>
</template>

<script>
	export default {
		name: "footerNav",
		data() {
			return {
				selectedTab: 0, //选中的TabBar
				tabbarItems: [{
						title: "首页",
						routeName: "home",
						icon: "home-o",
					},
					{
						title: "商品",
						routeName: "product",
						icon: "gift-o",
					},
					{
						title: "论坛",
						routeName: "forum",
						icon: "friends-o",
					},
					{
						title: "我的",
						routeName: "user",
						icon: "user-o",
					},

				],
			};
		},
	}
</script>

<style>
</style>
